<%@ include file="/WEB-INF/includeFile.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>REST With JSON</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<script type="text/javascript">
var prefix = 'http://home-pc:8088/commonApp/restTest/';

var RestGet = function() {
        $.ajax({
        type: 'GET',
        url:   'logins',
        dataType: 'json',
        async: true,
        success: function(result) {
            alert('JSON PARSED DATA: ' + result.data[0].username);
        },
        error: function(jqXHR, textStatus, errorThrown) {
            alert(jqXHR.status + ' ' + jqXHR.responseText);
        }
   });
}
</script>
</head>
<body>
<h1>Test Rest Functionality</h1>
<button type='button' onclick='RestGet()'>GET</button>
<button type='button' onclick=''>PUT</button>
</body>
</html>